<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Change Picture</title>
    </head>

    <body>
        <div id="app">
            <button @click="index--" v-show="index > 0">上一页</button>
            <div>
                <img :src="pictureList[index]" alt="">
            </div>
            <button @click="index++" v-show="index < pictureList.length - 1">下一页</button>
        </div>

        <script src="../src/Vue2/vue.js"></script>

        <script>
            const app = new Vue({
                el: '#app',
                data: {
                    pictureList: [
                        '../src/imgs/sun0.jpg',
                        '../src/imgs/sun1.jpg',
                    ],
                    index: 0
                },
                methods: {

                }
            })
        </script>
    </body>

</html>